<template>
	<!-- 首页-场馆 -->
	<view class="hwxcVenue_main">
		<view class="venueItem" v-for="(item,index) in venueList" :key="item.id" >
			<image :src="getImageUrl(item.images)" style="width: 100%; height: 100%; border-radius: 24rpx" @click="goTopath(item.id)"></image>
		</view>
	</view>
</template>

<script>
	import { imageUrl } from '../../utils/tools.js';
export default {
	name: 'hwxcVenue',
	data() {
		return {};
	},
	props: {
		venueList: {
			type: Array,
			default: () => []
		}
	},
	methods: {
		goTopath(id) {
			uni.navigateTo({
				url: `/pages/venue/venue?id=${id}`
			});
		},
		getImageUrl(image) {
			return imageUrl(image);
		}
	}
};
</script>

<style scoped lang="scss">
.hwxcVenue_main {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-gap: 20rpx;
	width: 100%;
	height: 100%;
	.venueItem {
		box-sizing: border-box;
		height: 180rpx;
		background-color: #fff;
		border-radius: 24rpx;
	}
}
</style>
